import React from 'react';
import Link from 'next/link';
import Router from 'next/router';

const Home = ()=>{
  function goA() {
    Router.push('/pageA')
  }
  return (
    <>
      <div>首页</div>
      <Link href="./pageA">
        {/* 不支持兄弟标签并列 */}
        <a>
          <span>去A页面</span>
          <span>我的博客</span>
        </a>
      </Link>
      <Link href="./pageB"><a>去B页面</a></Link>
      <div>
        <button onClick={()=>{Router.push('/pageA')}}>去A页面</button>
        <button onClick={goA}>去A页面</button>
        <button onClick={()=>{Router.push('/pageB')}}>去B页面</button>
      </div>
    </>
  )
}
export default Home